package com.pilipili.zeus.eduService.controller;


import com.pilipili.commonutils.Result;
import com.pilipili.zeus.eduService.service.EduCourseCollectService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 番剧分类 前端控制器
 *
 * @author Unlimited_Blade_Works
 * @since 2021-06-06
 */
@RestController
@RequestMapping("/eduService/courseCollect")
public class EduCourseCollectController {
    @Autowired
    private EduCourseCollectService courseCollectService;

    @ApiOperation(value = "读取courseSortExcel中的表格,写入数据库")
    @PostMapping("addCoursesSort")
    public Result addCoursesSort(MultipartFile file){
        courseCollectService.saveCourseSortDataByExcel(file,courseCollectService);
        return Result.ok();
    }
}

